package org.nimi317.web_gis.Enum;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Map;

/**
 * @author thunderobot
 */
@AllArgsConstructor
@Getter
public enum UserStatus {
    NORMAL(0, "正常", ButtonStatus.SUCCESS);

    @EnumValue
    @JsonValue
    @JSONField
    private final int code;

    private final String value;

    private final ButtonStatus type;

    public Map<String, ?> getObject() {
        return Map.of("code", code, "value", value, "type", type);
    }
}
